{% load wiki_markup %}

<div id="{{object.slug}}" class="object">

    <div id="{{object.slug}}Header" class="objectHeader">
    
        <h2 class="objectTitle"><a href="{{object.get_absolute_url}}">{{ object.title }}</a></h2>
    

    <span id="{{object.slug}}Details" class="objectDetails">
    
    {% if object.date_time %}
        posted 
        {{ object.date_time|date:"D d M Y" }}, 
    {% endif %}
    
    {% if object.date_added %}
        added 
        {{ object.date_added|date:"D d M Y" }},
    {% endif %}
    
    </div>
    <div id="{{object.slug}}Content" class="objectContent">
        
        {{ object.description|wiki_to_html }} 
    
    <!-- if object is a photo gallery, display sample photos-->
        {% if object.projectupdate_set.all %}
            <div class="subObject">
            {% for update in project.projectupdate_set.all%}
                <div id="{{update.title}}" class="subObjectTitle collapse_head">
                <h4 class="subObjectDetails">Update on {{update.date_time}}: {{update.title}}</h3>
                </div>
                <div id="{{update.title}}" class="subObjectContent collapse_body">
                {{update.description|wiki_to_html}}
                </div>

            {% endfor %}
            </div>
        {% endif %}
    
    <!-- if object is a photo gallery, display sample photos-->
        {% if object.sample %}
        
            {% for photo in object.sample %}
                        
    

        <div class="figure">
            <p> <a href="{{ photo.get_absolute_url }}"><img src="{{ photo.thumbnail.url }}" class="thumbnail" alt="{{ photo.title }}"/></a>
                  <p>
                    
                    {{ photo.title }}<br />
                    
                    {% if photo.caption %}
                    {{ photo.caption }}<br />
                    {% endif %}
                  </p>
            </p>
        </div>

            {% endfor %}
        {% endif %}
    </div>
    
    <!-- if object has related photos, display their previewss-->

</div>
